Optimal. Leaf size=86 \[ \frac {2}{3} b x \cosh \left (a+\frac {b}{x^2}\right )+\frac {1}{3} b^{3/2} e^{-a} \sqrt {\pi } \text {Erf}\left (\frac {\sqrt {b}}{x}\right )-\frac {1}{3} b^{3/2} e^a \sqrt {\pi } \text {Erfi}\left (\frac {\sqrt {b}}{x}\right )+\frac {1}{3} x^3 \sinh \left (a+\frac {b}{x^2}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 86, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {5454, 5434,
5435, 5406, 2235, 2236} \begin {gather*} \frac {1}{3} \sqrt {\pi } e^{-a} b^{3/2} \text {Erf}\left (\frac {\sqrt {b}}{x}\right )-\frac {1}{3} \sqrt {\pi } e^a b^{3/2} \text {Erfi}\left (\frac {\sqrt {b}}{x}\right )+\frac {2}{3} b x \cosh \left (a+\frac {b}{x^2}\right )+\frac {1}{3} x^3 \sinh \left (a+\frac {b}{x^2}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2235
Rule 2236
Rule 5406
Rule 5434
Rule 5435
Rule 5454
Rubi steps
\begin {align*} \int x^2 \sinh \left (a+\frac {b}{x^2}\right ) \, dx &=-\text {Subst}\left (\int \frac {\sinh \left (a+b x^2\right )}{x^4} \, dx,x,\frac {1}{x}\right )\\ &=\frac {1}{3} x^3 \sinh \left (a+\frac {b}{x^2}\right )-\frac {1}{3} (2 b) \text {Subst}\left (\int \frac {\cosh \left (a+b x^2\right )}{x^2} \, dx,x,\frac {1}{x}\right )\\ &=\frac {2}{3} b x \cosh \left (a+\frac {b}{x^2}\right )+\frac {1}{3} x^3 \sinh \left (a+\frac {b}{x^2}\right )-\frac {1}{3} \left (4 b^2\right ) \text {Subst}\left (\int \sinh \left (a+b x^2\right ) \, dx,x,\frac {1}{x}\right )\\ &=\frac {2}{3} b x \cosh \left (a+\frac {b}{x^2}\right )+\frac {1}{3} x^3 \sinh \left (a+\frac {b}{x^2}\right )+\frac {1}{3} \left (2 b^2\right ) \text {Subst}\left (\int e^{-a-b x^2} \, dx,x,\frac {1}{x}\right )-\frac {1}{3} \left (2 b^2\right ) \text {Subst}\left (\int e^{a+b x^2} \, dx,x,\frac {1}{x}\right )\\ &=\frac {2}{3} b x \cosh \left (a+\frac {b}{x^2}\right )+\frac {1}{3} b^{3/2} e^{-a} \sqrt {\pi } \text {erf}\left (\frac {\sqrt {b}}{x}\right )-\frac {1}{3} b^{3/2} e^a \sqrt {\pi } \text {erfi}\left (\frac {\sqrt {b}}{x}\right )+\frac {1}{3} x^3 \sinh \left (a+\frac {b}{x^2}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.06, size = 84, normalized size = 0.98 \begin {gather*} \frac {1}{3} \left (2 b x \cosh \left (a+\frac {b}{x^2}\right )+b^{3/2} \sqrt {\pi } \text {Erf}\left (\frac {\sqrt {b}}{x}\right ) (\cosh (a)-\sinh (a))-b^{3/2} \sqrt {\pi } \text {Erfi}\left (\frac {\sqrt {b}}{x}\right ) (\cosh (a)+\sinh (a))+x^3 \sinh \left (a+\frac {b}{x^2}\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.35, size = 103, normalized size = 1.20
method | result | size |
risch | \(-\frac {{\mathrm e}^{-a} x^{3} {\mathrm e}^{-\frac {b}{x^{2}}}}{6}+\frac {{\mathrm e}^{-a} \sqrt {\pi }\, b^{\frac {3}{2}} \erf \left (\frac {\sqrt {b}}{x}\right )}{3}+\frac {{\mathrm e}^{-a} {\mathrm e}^{-\frac {b}{x^{2}}} b x}{3}+\frac {{\mathrm e}^{a} x^{3} {\mathrm e}^{\frac {b}{x^{2}}}}{6}+\frac {{\mathrm e}^{a} b \,{\mathrm e}^{\frac {b}{x^{2}}} x}{3}-\frac {{\mathrm e}^{a} b^{2} \sqrt {\pi }\, \erf \left (\frac {\sqrt {-b}}{x}\right )}{3 \sqrt {-b}}\) | \(103\) |
meijerg | \(-\frac {b \sqrt {\pi }\, \cosh \left (a \right ) \sqrt {2}\, \sqrt {i b}\, \left (-\frac {4 x^{3} \sqrt {2}\, \left (\frac {2 b}{x^{2}}+1\right ) {\mathrm e}^{\frac {b}{x^{2}}}}{3 \sqrt {\pi }\, \sqrt {i b}\, b}+\frac {4 x^{3} \sqrt {2}\, \left (-\frac {2 b}{x^{2}}+1\right ) {\mathrm e}^{-\frac {b}{x^{2}}}}{3 \sqrt {\pi }\, \sqrt {i b}\, b}-\frac {8 \sqrt {2}\, \sqrt {b}\, \erf \left (\frac {\sqrt {b}}{x}\right )}{3 \sqrt {i b}}+\frac {8 \sqrt {2}\, \sqrt {b}\, \erfi \left (\frac {\sqrt {b}}{x}\right )}{3 \sqrt {i b}}\right )}{16}-\frac {i b \sqrt {\pi }\, \sinh \left (a \right ) \sqrt {2}\, \sqrt {i b}\, \left (-\frac {8 x^{3} \sqrt {2}\, \left (-\frac {b}{x^{2}}+\frac {1}{2}\right ) {\mathrm e}^{-\frac {b}{x^{2}}}}{3 \sqrt {\pi }\, \left (i b \right )^{\frac {3}{2}}}-\frac {8 x^{3} \sqrt {2}\, \left (\frac {b}{x^{2}}+\frac {1}{2}\right ) {\mathrm e}^{\frac {b}{x^{2}}}}{3 \sqrt {\pi }\, \left (i b \right )^{\frac {3}{2}}}+\frac {8 \sqrt {2}\, b^{\frac {3}{2}} \erf \left (\frac {\sqrt {b}}{x}\right )}{3 \left (i b \right )^{\frac {3}{2}}}+\frac {8 \sqrt {2}\, b^{\frac {3}{2}} \erfi \left (\frac {\sqrt {b}}{x}\right )}{3 \left (i b \right )^{\frac {3}{2}}}\right )}{16}\) | \(258\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.31, size = 58, normalized size = 0.67 \begin {gather*} \frac {1}{3} \, x^{3} \sinh \left (a + \frac {b}{x^{2}}\right ) + \frac {1}{6} \, {\left (x \sqrt {\frac {b}{x^{2}}} e^{\left (-a\right )} \Gamma \left (-\frac {1}{2}, \frac {b}{x^{2}}\right ) + x \sqrt {-\frac {b}{x^{2}}} e^{a} \Gamma \left (-\frac {1}{2}, -\frac {b}{x^{2}}\right )\right )} b \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 267 vs.
\(2 (64) = 128\).
time = 0.43, size = 267, normalized size = 3.10 \begin {gather*} -\frac {x^{3} - {\left (x^{3} + 2 \, b x\right )} \cosh \left (\frac {a x^{2} + b}{x^{2}}\right )^{2} - 2 \, \sqrt {\pi } {\left (b \cosh \left (a\right ) \cosh \left (\frac {a x^{2} + b}{x^{2}}\right ) + b \cosh \left (\frac {a x^{2} + b}{x^{2}}\right ) \sinh \left (a\right ) + {\left (b \cosh \left (a\right ) + b \sinh \left (a\right )\right )} \sinh \left (\frac {a x^{2} + b}{x^{2}}\right )\right )} \sqrt {-b} \operatorname {erf}\left (\frac {\sqrt {-b}}{x}\right ) - 2 \, \sqrt {\pi } {\left (b \cosh \left (a\right ) \cosh \left (\frac {a x^{2} + b}{x^{2}}\right ) - b \cosh \left (\frac {a x^{2} + b}{x^{2}}\right ) \sinh \left (a\right ) + {\left (b \cosh \left (a\right ) - b \sinh \left (a\right )\right )} \sinh \left (\frac {a x^{2} + b}{x^{2}}\right )\right )} \sqrt {b} \operatorname {erf}\left (\frac {\sqrt {b}}{x}\right ) - 2 \, {\left (x^{3} + 2 \, b x\right )} \cosh \left (\frac {a x^{2} + b}{x^{2}}\right ) \sinh \left (\frac {a x^{2} + b}{x^{2}}\right ) - {\left (x^{3} + 2 \, b x\right )} \sinh \left (\frac {a x^{2} + b}{x^{2}}\right )^{2} - 2 \, b x}{6 \, {\left (\cosh \left (\frac {a x^{2} + b}{x^{2}}\right ) + \sinh \left (\frac {a x^{2} + b}{x^{2}}\right )\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int x^{2} \sinh {\left (a + \frac {b}{x^{2}} \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int x^2\,\mathrm {sinh}\left (a+\frac {b}{x^2}\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________